package com.yzj.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yzj.Dao.EmpDao;
import com.yzj.pojo.Emp;
import org.springframework.stereotype.Service;

import java.util.Map;
@Service
public class EmpServiceImpl extends ServiceImpl<EmpDao, Emp> implements EmpService{
    @Override
    public String hello(String name) {
        return "hello:"+name;
    }

    @Override
    public Emp login(Emp emp) {
        return baseMapper.selectOne(new QueryWrapper<Emp>().
                allEq(Map.of("empno",emp.getEmpno(),"ename",emp.getEname())));

    }

    @Override
    public Map<String, Object> map(Map<String, Object> map) {
        map.put("next","yes");
        return map;
    }
}
